package com.fram.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fram.bean.admin.android.goods.request.GoodsAndroidListRequest;
import com.fram.bean.admin.android.goods.request.GoodsSalesRequest;
import com.fram.bean.admin.android.goods.response.GoodsAndroidListResponse;
import com.fram.bean.admin.android.goods.response.GoodsSalesResponse;
import com.fram.bean.admin.goods.response.GoodsResponse;
import com.fram.bean.admin.goods.response.GoodsSearchResponse;
import com.fram.bean.api.project.request.ProjectGoodsSearchRequest;
import com.fram.bean.api.project.response.ProjectGoodsDetailResponse;
import com.fram.bean.api.project.response.ProjectGoodsSearchResponse;
import com.fram.entity.ProjectGoods;

public interface ProjectGoodsMapper {
	
	int insertSelective(ProjectGoods record);

	int updateByPrimaryKey(ProjectGoods record);

	int deleteByPrimaryKey(@Param("id") Long id);

	GoodsResponse selectByPrimaryKey(@Param("id") Long id);

	int updateByPrimaryKeySelective(ProjectGoods record);
	
	/**===========================**/
	List<ProjectGoodsSearchResponse> listForApi(ProjectGoodsSearchRequest request);
	// 后台管理功能-查询所有商品
	List<GoodsSearchResponse> listForAdmin(ProjectGoods request);
	
	ProjectGoodsDetailResponse detailApi(@Param("id") Long id, @Param("userId") Long userId);

	List<ProjectGoods> selectByPriceId(List<Long> priceId);

	/** 商品下拉 根据分销商 查询全部 **/
	List<ProjectGoods> dropDown(@Param("distributorId") Long distributorId);

	/** 菜单 首页 **/
	List<ProjectGoods> selectByView(@Param("view") String view);
	
	List<ProjectGoods> selectByCategoryId(@Param("categoryId") Long categoryId,@Param("distributorId")Long distributorId);
	
	//查询商品 android 
	List<GoodsAndroidListResponse> listForAndroid(GoodsAndroidListRequest request);
	
	ProjectGoods selectByIdAndroid(@Param("id")Long id);
	
	//产品销售状况
	List<GoodsSalesResponse> goodsSales(GoodsSalesRequest request);

}